Optimal. Leaf size=70 \[ -\frac{e \sqrt{b^2-4 a c} \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c}+\frac{(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}+2 e x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0899044, antiderivative size = 70, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {773, 634, 618, 206, 628} \[ -\frac{e \sqrt{b^2-4 a c} \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c}+\frac{(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}+2 e x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 773
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{(b+2 c x) (d+e x)}{a+b x+c x^2} \, dx &=2 e x+\frac{\int \frac{b c d-2 a c e+\left (2 c^2 d-b c e\right ) x}{a+b x+c x^2} \, dx}{c}\\ &=2 e x+\frac{\left (\left (b^2-4 a c\right ) e\right ) \int \frac{1}{a+b x+c x^2} \, dx}{2 c}+\frac{(2 c d-b e) \int \frac{b+2 c x}{a+b x+c x^2} \, dx}{2 c}\\ &=2 e x+\frac{(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}-\frac{\left (\left (b^2-4 a c\right ) e\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c}\\ &=2 e x-\frac{\sqrt{b^2-4 a c} e \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c}+\frac{(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}\\ \end{align*}
Mathematica [A] time = 0.0663603, size = 72, normalized size = 1.03 \[ \frac{-2 e \sqrt{4 a c-b^2} \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )+(2 c d-b e) \log (a+x (b+c x))+4 c e x}{2 c} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 113, normalized size = 1.6 \begin{align*} 2\,ex-{\frac{\ln \left ( c{x}^{2}+bx+a \right ) be}{2\,c}}+\ln \left ( c{x}^{2}+bx+a \right ) d-4\,{\frac{ae}{\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{{b}^{2}e}{c}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.49453, size = 410, normalized size = 5.86 \begin{align*} \left [\frac{4 \, c e x + \sqrt{b^{2} - 4 \, a c} e \log \left (\frac{2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt{b^{2} - 4 \, a c}{\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) +{\left (2 \, c d - b e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c}, \frac{4 \, c e x - 2 \, \sqrt{-b^{2} + 4 \, a c} e \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) +{\left (2 \, c d - b e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.870778, size = 134, normalized size = 1.91 \begin{align*} 2 e x + \left (- \frac{e \sqrt{- 4 a c + b^{2}}}{2 c} - \frac{b e - 2 c d}{2 c}\right ) \log{\left (x + \frac{d + \frac{e \sqrt{- 4 a c + b^{2}}}{2 c} + \frac{b e - 2 c d}{2 c}}{e} \right )} + \left (\frac{e \sqrt{- 4 a c + b^{2}}}{2 c} - \frac{b e - 2 c d}{2 c}\right ) \log{\left (x + \frac{d - \frac{e \sqrt{- 4 a c + b^{2}}}{2 c} + \frac{b e - 2 c d}{2 c}}{e} \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15595, size = 109, normalized size = 1.56 \begin{align*} 2 \, x e + \frac{{\left (2 \, c d - b e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c} + \frac{{\left (b^{2} e - 4 \, a c e\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} c} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]